var i;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FMButton = undefined;
var AudioManager = require("AA_AudioManager");
var _decorator = cc._decorator;
var _ccclass = _decorator.ccclass;
var _property = _decorator.property;
var _menu = _decorator.menu;
var p = _decorator.disallowMultiple;
_decorator.executionOrder;
var h = _decorator.requireComponent;
var FMButton = function (e) {
  function _creator() {
    var t = null !== e && e.apply(this, arguments) || this;
    t.isScale = true;
    t.isBtSound = true;
    t.isBtSound1 = false;
    t.offtime = 0;
    return t;
  }
  __extends(_creator, e);
  _creator.prototype.onLoad = function () {
    var e = this;
    var t = this.node.getComponent(cc.Button);
    if (t.transition == cc.Button.Transition.NONE && this.isScale) {
      t.transition = cc.Button.Transition.SCALE;
      t.duration = .1;
      t.zoomScale = .9;
    }
    this.node.on("click", function () {
      e.offtime = new Date().getTime() - e.offtime;
      if (e.offtime > 100) {
        e.isBtSound && AudioManager.AudioMgr.playEffect("audio/effect/button");
        e.isBtSound1;
        e.offtime = new Date().getTime();
      }
    }, this);
  };
  __decorate([_property()], _creator.prototype, "isScale", undefined);
  __decorate([_property()], _creator.prototype, "isBtSound", undefined);
  __decorate([_property()], _creator.prototype, "isBtSound1", undefined);
  return __decorate([_ccclass, h(cc.Button), p(), _menu("FM组件/FMButton")], _creator);
}(cc.Component);
exports.FMButton = FMButton;